package com.lq.demo.demo.mode.swagger;

import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = {"测试类2"},description = "测试描述")
public class SwaggerDemo2 {


    @ApiOperation(value = "测试hello接口2")
    @ApiImplicitParams(
            {@ApiImplicitParam(name = "num", value = "数量", required = false, dataTypeClass = Integer.class,paramType = "path"),
                    @ApiImplicitParam(name = "desc", value = "描述", required = true, dataTypeClass = String.class, paramType = "query")

            })
    @GetMapping("/hello2/{id}")
    public String test2(@PathVariable Integer id, String desc) {
        return "hello swagger2" + desc+id;
    }
}
